package com.cleaningcloud.erp.mapper;

import com.cleaningcloud.erp.domain.ErpOutbound;
import com.cleaningcloud.erp.domain.ErpOutboundDetails;
import com.cleaningcloud.erp.domain.dto.ErpOutboundDetailsDto;
import com.cleaningcloud.erp.domain.vo.ErpOutboundVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 销售出库Mapper接口
 *
 * @author cleaningcloud
 * @date 2024-10-02
 */
public interface ErpOutboundMapper {
    /**
     * 查询销售出库
     *
     * @param outboundId 销售出库主键
     * @return 销售出库
     */
    ErpOutboundVo selectErpOutboundByOutboundId(Long outboundId);

    /**
     * 查询销售出库列表
     *
     * @param erpOutbound 销售出库
     * @return 销售出库集合
     */
    List<ErpOutboundVo> selectErpOutboundList(ErpOutbound erpOutbound);

    /**
     * 新增销售出库
     *
     * @param erpOutbound 销售出库
     * @return 结果
     */
    int insertErpOutbound(ErpOutbound erpOutbound);

    /**
     * 修改销售出库
     *
     * @param erpOutbound 销售出库
     * @return 结果
     */
    int updateErpOutbound(ErpOutbound erpOutbound);

    /**
     * 删除销售出库
     *
     * @param outboundId 销售出库主键
     * @return 结果
     */
    int deleteErpOutboundByOutboundId(Long outboundId);

    /**
     * 批量删除销售出库
     *
     * @param outboundIds 需要删除的数据主键集合
     * @return 结果
     */
    int deleteErpOutboundByOutboundIds(Long[] outboundIds);


    /**
     * 批量新增销售出库明细
     *
     * @param list
     */
    void batchOutboundDetailsInsert(@Param("list") List<ErpOutboundDetails> list);


    /**
     * 修改销售出库明细
     *
     * @param list 采购入库明细
     */
    void updateErpOutboundDetails(ErpOutboundDetailsDto erpOutboundDetailsDto);

    /**
     * @Author Shaw
     * @Description 根据应收账款ID获取出库信息
     * @date: 2025-04-03 14:58
     * @param: //TODO
     */
    ErpOutboundVo selectErpOutboundByReceivableId(Long receivableId);
}
